{# A live call's parts, wherever a call is held: the chat surface and the stage (stage.html). They read chat_path, voice, assistant, operator and calls from the page (``chat_surface._call_context``). #} {% from "components/macros/icons.html" import icon %} {% from "components/macros/form.html" import button_classes %} {% from "components/macros/chat.html" import voice_states %} {# A call's states, as the phone and the call bar both draw them. #} {% macro phone_states(size="w-4 h-4") %}{% call voice_states(size, record=True, work=True) %}{{ icon("phone", size) }}{% endcall %}{% endmacro %} {# The phone: the call's socket, its mic worklet, where its saved turns reload from, and how it is heard (voice.js). The caller draws it. #} {% macro phone(box) %} {% endmacro %} {# What the microphone or the call is doing, read out as well as shown. The server's own refusals (nothing heard, transcription down) arrive as text. #} {% macro mic_states() %} Listening - press the microphone again when you're done. Working out what you said... {{ assistant }} is working on it... Speaking - press the microphone to interrupt. The microphone is blocked. Allow it for this site, or type instead. This browser can't record here. You can type instead. Couldn't reach the app. You can type instead. {% if calls %} Talking live - just speak. {{ assistant }} is pulling that up... Muted - {{ assistant }} can't hear you. Hanging up in s - say anything to stay on. The call dropped. Call again, or type instead. {% endif %} {% endmacro %} {# What the call is doing, the engine, a timer and the running cost (its split on hover: the call's voice and its thinking, the turns it handed off), mute and hang up; voice.js shows it and fills the figures. ``attach``: the composer's picture picker is on the page to reach. #} {% macro call_bar(attach=True, box="border-t border-aegis-border pt-3") %}